var os = require('os');
var ifaces;
var ifaces = os.networkInterfaces();

// getLocalIP()['以太网'];

// let add1 = ip[0]
let ip = ifaces['以太网']
let add = '';
for (let i = 0; i < ip.length; i++) {
    if(ip[i].family == 'IPv4'){
        add = ip[i].address
    }
    
}


// console.log(add);
module.exports = add;